package com.gtt.pattern.structural.bridge;

/**
 * 
 * @author Michael(gao12581@sina.com)
 * @date 2011-3-7 18:42:56
 * 
 */
public class Client {

    public static void main(String[] args) {
        testMain(new Abstraction(), new Implementor());
        testMain(new Abstraction(), new ConcreteImplementorA());
        testMain(new RefinedAbstraction(), new Implementor());
        testMain(new RefinedAbstraction(), new ConcreteImplementorA());

    }

    private static void testMain(Abstraction abstraction, Implementor implementor) {
        System.out.println("=========start===========");
        abstraction.setImplementor(implementor);
        abstraction.operation("测试");
        System.out.println("=========end===========");
        System.out.println();
    }
}
